package com.yongbao.model.dtomapper;

import com.yongbao.model.domain.DishDO;
import com.yongbao.model.request.DishRequest;
import com.yongbao.model.vo.DishVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface DishDtoMapper {

    DishDtoMapper INSTANCE = Mappers.getMapper(DishDtoMapper.class);

    /**
    * DO to VO
    * @param dishDO
    * @return
    */
    DishVO do2VO(DishDO dishDO);

    /**
     * request to DO
     * @param request
     * @return
     */
    DishDO request2DO(DishRequest request);
}
